#!/sbin/openrc-run
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later

depend() {
	need net
}

start() {
	ebegin "Starting OpenTTD dedicated server"
	start-stop-daemon --start -q --exec /usr/games/bin/openttd -- -D -f > /dev/null
	eend $?
}

stop() {
	ebegin "Stopping OpenTTD dedicated server"
	start-stop-daemon --stop -q -n openttd
	eend $?
}
